﻿<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="utf-8" %>

<form id="form1">
    <div class='myzh_right_content fr'>
        <p class='right_head_title'><span class="span1">我的 ></span> 操作</p>
        <div class="recharge-content">
            <input type="hidden" id="withdraw_id" name="withdraw_id" value="${data.withdraw_id}"/>
            <div class="mt-10">
                <span class="fl mt-3 w-120">提现编号：</span>
                ${data.withdraw_id}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">用户编号：</span>
                ${data.user_id}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">提币名称：</span>
                ${data.token_name}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">提币数量：</span>
                ${data.withdraw_account}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">审核状态：</span>
                <c:choose>
                    <c:when test="${data.audit_status==0 }">
                        待审核
                    </c:when>
                    <c:when test="${data.audit_status==1 }">
                        审核通过
                    </c:when>
                    <c:when test="${data.audit_status==2 }">
                        审核拒绝
                    </c:when>
                </c:choose>
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">回调状态：</span>
                <c:choose>
                    <c:when test="${data.pay_status==0 }">
                        提币中
                    </c:when>
                    <c:when test="${data.pay_status==1 }">
                        提币成功
                    </c:when>
                    <c:when test="${data.pay_status==2 }">
                        提币失败
                    </c:when>
                </c:choose>
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">提现时间：</span>
                <fmt:formatDate value="${data.create_time}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate>
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">回调时间：</span>
                <fmt:formatDate value="${data.callback_time}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate>
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">手续费token类型：</span>
                ${data.service_token}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">手续费比例：</span>
                ${data.service_proportion}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">手续费：</span>
                ${data.service_charge}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">矿工费：</span>
                ${data.gas_account}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">实际到账金额：</span>
                ${data.actual_account}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">审核人ID：</span>
                ${data.admin_id}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">审核人名称：</span>
                ${data.admin_name}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">驳回原因：</span>
                <input type="text" class="txt txt-1 fl w-320" id="withdraw_refuse" name="withdraw_refuse"
                       value="${data.withdraw_refuse}">
                <div class="cl"></div>
            </div>
            <div class="mt-30 ml-10">
                <c:if test="${data.audit_status==0 }">
                    <input type="button" class="btn btn-1 fl w-100" value="审核通过" onclick="success()">
                    <input type="button" class="btn btn-1 fl w-100 ml-20" value="审核拒绝" onclick="fail()">
                </c:if>
                <input type="button" class="btn btn-2 fl w-100 ml-20" value="返回"
                       onclick="window.location='${basePath}/t_user_withdraw/list'">
            </div>
        </div>
    </div>
</form>
<div class='clear'></div>
<script type="text/javascript">
    function success() {
        $.post("${basePath}/ajax/t_user_withdraw/success", {
            withdraw_id: $("#withdraw_id").val()
        }, function (d) {
            if (d.code == 1) {
                alert("操作成功");
                window.location = "${basePath}/t_user_withdraw/list";
                return;
            }
            alert(msg);
        });
    }
    function fail(){
        var withdraw_refuse= $("#withdraw_refuse").val();
        if (withdraw_refuse== "") {
            alert("请填写驳回原因");
            return;
        }
        $.post("${basePath}/ajax/t_user_withdraw/fail", {
            withdraw_refuse:withdraw_refuse,
            withdraw_id: $("#withdraw_id").val()
        }, function (d) {
            if (d.code == 1) {
                alert("操作成功");
                window.location = "${basePath}/t_user_withdraw/list";
                return;
            }
            alert(msg);
        });
    }
</script>


